import request from '@/config/axios'

// 师昌绪终评-评委设置 VO
export interface ScxFinalJugdeVO {
  id: string // 终评评委ID
  finalSettingsId: string // 终评设置ID
  confirmed: boolean // 是否确认推荐结果
  judgeId: number // 评委账号ID
}

// 管理后台 - 师昌绪终评评委已选列表 Response VO
export interface ScxFinalJudgeSelectedRespVO {
  id: string // 主键
  finalSettingsId: string // 终评设置ID
  judgeId: number // 导师ID,系统账号表system_users中 ID
  confirmed: boolean // 是否确认推荐结果
  nickname: string // 教师姓名
  jobCode: string // 工号
  mobile: string // 手机号码
  deptName: string // 部门名称
}

// 师昌绪终评-评委设置 API
export const ScxFinalJugdeApi = {
  // 查询师昌绪终评-评委设置分页
  getScxFinalJugdePage: async (params: any) => {
    return await request.get({ url: `/awards/scx-final-jugde/page`, params })
  },

  // 查询师昌绪终评-评委设置详情
  getScxFinalJugde: async (id: string) => {
    return await request.get({ url: `/awards/scx-final-jugde/get?id=` + id })
  },

  // 新增师昌绪终评-评委设置
  createScxFinalJugde: async (data: ScxFinalJugdeVO) => {
    return await request.post({ url: `/awards/scx-final-jugde/create`, data })
  },

  // 修改师昌绪终评-评委设置
  updateScxFinalJugde: async (data: ScxFinalJugdeVO) => {
    return await request.put({ url: `/awards/scx-final-jugde/update`, data })
  },

  // 删除师昌绪终评-评委设置
  deleteScxFinalJugde: async (id: string) => {
    return await request.delete({ url: `/awards/scx-final-jugde/delete?id=` + id })
  },

  // 导出师昌绪终评-评委设置 Excel
  exportScxFinalJugde: async (params) => {
    return await request.download({ url: `/awards/scx-final-jugde/export-excel`, params })
  },

  // 批量新增师昌绪终评-评委设置
  createScxFinalJugdeBatch: async (settingsId: string, data: Partial<ScxFinalJugdeVO>[]) => {
    return await request.post({ url: `/awards/scx-final-jugde/create-batch/${settingsId}`, data })
  },

  // 批量删除师昌绪终评-评委设置
  deleteScxFinalJugdeBatch: async (settingsId: string, data: Partial<ScxFinalJugdeVO>[]) => {
    return await request.delete({ url: `/awards/scx-final-jugde/delete-batch/${settingsId}`, data })
  }
}
